FSI API: Combo box

Reading a combo box selection

fsi.getById('<control id>'); Returns the value of a selection made in a combo box according to the setting of Data Key. 
  • When Data Key is Text, fsi.getById returns the value of Label when the combo box is populated manually, or the data object column when bound to a data object.
  • When Data Key is Value, fsi.getById returns the value of Value when the combo box is populated manually, or the data object SystemId when bound to a data object.
fsi.getComboText('<control id>'); Returns the value of Text selected in a combo box irrespective of the setting of Data Key. When populated by a data object, it returns the value of the data object column.
fsi.getComboValue('<control id>'); Returns the value of Value selected in a combo box irrespective of the setting of Data Key. When populated by a data object, it returns the SystemId.

Setting a selected option

The FSI API method fsi.setById() may be used to set a selection in a combo box, overriding any existing selection.

  • For combo boxes using manually configured selections, the selection to be set must be specified as either a valid Label, or a Value according to the setting of Data Key, (Text or Value respectively).
  • For combo boxes bound to a data object, the selection to be set must be specified as either a valid column value or a SystemID according to the setting of Data Key, (Text or Value respectively).
  • For both manually and data object populated combo boxes, if Data Key is set to Value, you can clear a selection by specifying a null value <''> for selection.

For more details see Combo Box Control in Web Apps > Page Controls.

fsi.setById('<control id>',<selection>); Sets the selection in a combo box.

Filtering

fsi.filterCombo('<control id>',<data object column name>,<column value>); Filters the combo box options when it is being populated by a data object.